Skip to content

Reuse operator signatures for direct calls - #672

Open
jogibear9988 wants to merge 1 commit into
dadhi:masterfrom
jogibear9988:fix/reuse-operator-signatures-20261114
Open

jogibear9988 wants to merge 1 commit into
dadhi:masterfrom
jogibear9988:fix/reuse-operator-signatures-20261114

Conversation

@jogibear9988

Copy link
Copy Markdown
Contributor

Reuse the parameter signature already obtained during operator validation when emitting a nonlifted operator call, avoiding a duplicate GetParameters allocation.

The existing operator/comparison suites exercise the shared helper, including callers that still obtain their own signatures. No emitted-code change is intended.

Validation

Full Release solution build and Standard/LightExpression native runners pass for net8.0, net10.0 and net472. net8.0: 684 TestX and 1744 legacy cases; net10.0: 684 TestX and 1745 legacy cases; net472: 665 TestX and 1610 legacy cases.

Measurements

FEC on master da14580f10fd19ae2361a8e91cfad4b2dfec182a → this change 43b15c03901c2fee39784f9ad7ac2227cc2d9201. Windows ARM64; .NET 8.0.28 and 10.0.9; SDK 10.0.301.

Trees, API conversions and invocation adapters are built before measurement. Compilation includes delegate creation; runtime measures the compiled delegate through the same adapter. Both sides are FEC: “System trees” names the expression API, not the System compiler.

Two opposite-load-order process rounds; seven alternating paired samples per round; medians of 14 samples, 100 ms calibration target. Verified task-local runtimes; tiered compilation disabled; each process pinned to one logical CPU. Allocations use GC.GetAllocatedBytesForCurrentThread. Slower observations are retained. Timing variation, including unchanged IL controls, prevents a blanket speedup or no-regression claim.

Runtime / API Workload Compile μs, master → patch Compile B/op Runtime ns, master → patch Runtime B/op
net10.0 / LightExpression custom_operator 4.337 → 3.503 1096.0 → 1056.0 4.381 → 4.192 0.0
net10.0 / LightExpression decimal_add 18.925 → 15.736 1024.0 → 984.0 16.146 → 14.265 0.0
net10.0 / LightExpression nullable_compound_local 17.321 → 16.122 2120.1 6.209 → 6.093 0.0
net10.0 / LightExpression scalar_add 12.656 → 10.752 872.0 9.300 → 8.175 0.0
net10.0 / System trees custom_operator 15.026 → 11.862 1096.2 → 1056.2 6.574 → 10.215 0.0
net10.0 / System trees decimal_add 17.069 → 17.269 1024.0 → 984.0 17.592 → 20.337 0.0
net10.0 / System trees nullable_compound_local 30.514 → 20.218 2120.1 10.809 → 7.037 0.0
net10.0 / System trees scalar_add 3.660 → 6.977 872.0 8.392 → 6.237 0.0
net8.0 / LightExpression custom_operator 16.451 → 14.342 1096.0 → 1056.0 7.019 → 6.717 0.0
net8.0 / LightExpression decimal_add 26.620 → 24.962 1064.0 → 1024.0 24.984 → 24.815 0.0
net8.0 / LightExpression nullable_compound_local 28.283 → 32.722 2120.1 12.398 → 10.520 0.0
net8.0 / LightExpression scalar_add 13.756 → 7.252 872.2 10.140 → 9.724 0.0
net8.0 / System trees custom_operator 15.142 → 23.118 1096.2 → 1056.2 9.398 → 6.519 0.0
net8.0 / System trees decimal_add 18.167 → 16.392 1064.0 → 1024.0 21.217 → 23.587 0.0
net8.0 / System trees nullable_compound_local 33.129 → 26.550 2120.1 7.348 → 7.433 0.0
net8.0 / System trees scalar_add 11.177 → 10.243 872.1 6.233 → 6.505 0.0

Shared-workload emitted IL is unchanged.

Allocation changes: custom_operator/compile: -40 B/op in both APIs on both runtimes; decimal_add/compile: -40 B/op in both APIs on both runtimes.

Reuse the parameter signature already obtained during operator validation when emitting a nonlifted operator call, avoiding a duplicate GetParameters allocation.

The existing operator/comparison suites exercise the shared helper, including callers that still obtain their own signatures. No emitted-code change is intended.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant